package com.fub.guidance;

public class Edge {

	private static final String UNINITALIZED_ID = "-1";
	private String id;
	private String buildingId;
	private String source;
	private String destination;
	private int weight;

	public Edge() {
		this.id = UNINITALIZED_ID;
	}

	/**
	 * Constructs a new edge.
	 * 
	 * @param id
	 *            the id of the new edge
	 * @param buildingId
	 *            the id of the building
	 * @param source
	 *            the source node
	 * @param destination
	 *            the destination node
	 * @param weight
	 *            the weight of the edge
	 */
	public Edge(String id, String buildingId, String source,
			String destination, int weight) {
		this.id = id;
		this.buildingId = buildingId;
		this.source = source;
		this.destination = destination;
		this.weight = weight;
	}

	/**
	 * Return the id of this edge.
	 * 
	 * @return the id of this edge
	 */
	public String getId() {
		return this.id;
	}

	/**
	 * Returns the building id of this edge.
	 * 
	 * @return the building id of this edge
	 */

	public String getBuildingId() {
		return this.buildingId;
	}

	/**
	 * Returns the source id of this edge.
	 * 
	 * @return the source id of this edge
	 */
	public String getSourceId() {
		return this.source;
	}

	/**
	 * Returns the destination id of this edge.
	 * 
	 * @return the destination id of this edge
	 */
	public String getDestinationId() {
		return this.destination;
	}

	/**
	 * Returns the weight id of this edge.
	 * 
	 * @return the weight id of this edge
	 */
	public int getWeight() {
		return this.weight;
	}

	/**
	 * Sets the weight of this edge.
	 * 
	 * @param weight
	 *            the weight of this edge
	 */
	public void setWeight(int weight) {
		this.weight = weight;
	}

	@Override
	public String toString() {
		return this.source + " " + this.destination;
	}
}
